<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>教师信息表管理</title>
	<meta name="decorator" content="default" />
	<script type="text/javascript">
		$(function(){
            $("td").css("vertical-align","middle");
		})
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li class="active"><a href="${ctx}/business/teacher/">教师信息表列表</a></li>
	<shiro:hasPermission name="business:teacher:edit">
		<li><a href="${ctx}/business/teacher/form?sort=10">教师信息表添加</a></li>
	</shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="teacher" action="${ctx}/business/teacher/" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
	<label>名称  ：</label>
	<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium" />
	<label>机构  ：</label>
	<tags:treeselect id="companyid" name="companyId" value="${teacher.companyId}" labelName="office.name" labelValue="${teacher.office.name}"
		 title="公司" url="/sys/office/treeData?type=1" cssClass="required" allowClear="true"/>
	<label>状态  ：</label>
	<form:select path="status" name="status" class="input-medium">
		<form:option value="" label="请选择" />
		<form:options items="${dic:getBusDictList('tb_teacher_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
	</form:select>
	<label>类型  ：</label>
	<form:select path="type" name="type" class="input-medium">
		<form:option value="" label="请选择" />
		<form:options items="${dic:getBusDictList('tb_teacher_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
	</form:select>
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
</form:form>
<tags:message content="${message}" />
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
			<%--<th></th>--%>
			<th>所属机构</th>
			<th>姓名</th>
			<th>头像</th>
			<th>教师电话</th>
			<th>教师状态</th>
			<th>教师类型</th>
			<th>微信名</th>
		<%--	<th>创建人</th>
			<th>创建日期</th>
			<th>修改人</th>
			<th>更新日期</th>--%>
			<th>备注</th>
		<shiro:hasPermission name="business:teacher:edit">
			<th>操作</th>
		</shiro:hasPermission>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="teacher">
		<tr>
				<%--<td>${teacher.id}</td>--%>
				<td>${teacher.office.name}</td>
				<td>${teacher.name}</td>
				<td><img src="${teacher.portrait}?x-oss-process=style/head" width="50px"></td>
				<td>${teacher.phone}</td>
				<td>${dic:getLabelByValue(teacher.status, 'tb_teacher_status')}</td>
				<td>${dic:getLabelByValue(teacher.type, 'tb_teacher_type')}</td>
				<td>${teacher.weChatUser.nickName}</td>
				<%--<td>${teacher.createBy}</td>
				<td>${teacher.createDate}</td>
				<td>${teacher.updateBy}</td>
				<td>${teacher.updateDate}</td>--%>
				<td>${teacher.remarks}</td>
			<shiro:hasPermission name="business:teacher:edit">
				<td><a href="${ctx}/business/teacher/form?id=${teacher.id}">修改</a>
					<a href="${ctx}/business/teacher/delete?id=${teacher.id}"
					   onclick="return confirmx('确认要删除该字典吗？', this.href)">删除</a>
					<a href="${ctx}/business/teacher/form">新增</a>
				</td>
			</shiro:hasPermission>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>